[glass] Runtime config for RepoMapping - #565
Conversation
✅ Deploy Preview for fb-oss-glean canceled.
|
|
@pepeiborra has imported this pull request. If you are a Meta employee, you can view this in D78405379. |
|
This is a bit tricky to merge, so I am wondering how useful it is. For most open source users, is a repo mapping needed? Presumably there is only one repo, and therefore all the DBs are applicable. |
|
@pepeiborra this doesn't actually work as intended, I'm putting it back in draft for now.
I suppose we could assume a 1:1 mapping between |
|
@pepeiborra I thought you might want to do this internally though, it was always a pain to have to redeploy Glass just to change the RepoMapping. |
|
Yeah, it's bound to happen at some poitn |
I had something simpler in mind, just give Glass a DB name or names at startup, or even allow it to check all the DBs in the store |
|
@pepeiborra see what you think of #566 That's sufficient for open source, I can return to the runtime config later if necessary. |
Right now with the open source build it's impossible to use Glass, because RepoMapping is fixed at compile-time. This moves it into a runtime config.
Tested with the following in
~/.config/glean/glass/repomapping:It defaults to an empty repomapping if one isn't provided. We'll probably need to fix up the react demo.